﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="添加房间.aspx.cs" Inherits="linkDATABASE.扩展.添加房间" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>添加房间信息</title>
    <style>
                table {
            border-collapse: collapse;
            box-shadow: 7px 9px 5px 0px #00000052;
        }
        td{
            border:1px solid black;
            padding:6px;
        }
        .non{
            
            box-shadow:none;
            padding:0;
            border:none;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <h2>添加房间信息</h2>
        <div>
            <table>
                <tr>
                    <td>房号 &nbsp;</td>
                    <td>
                        <asp:TextBox ID="TextBox1" runat="server" TextMode="Number"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" Display="Dynamic" ErrorMessage="RequiredFieldValidator" ForeColor="#FF0066">不可留空</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td>房型 &nbsp;</td>
                    <td>
                        <asp:DropDownList ID="DropDownList1" runat="server"></asp:DropDownList>&nbsp;</td>
                </tr>
                <tr>
                    <td>房态 &nbsp;</td>
                    <td>
                        <asp:DropDownList ID="DropDownList2" runat="server"></asp:DropDownList>&nbsp;</td>
                </tr>
                <tr>
                    <td>预订状态 &nbsp;</td>
                    <td>
                        <asp:RadioButtonList ID="RadioButtonList1" runat="server" BackColor="White" BorderStyle="None" CssClass="non" RepeatDirection="Horizontal">
                            <asp:ListItem Selected="True">是</asp:ListItem>
                            <asp:ListItem>否</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td>床位数 &nbsp;</td>
                    <td>
                        <asp:TextBox ID="TextBox2" runat="server" TextMode="Number"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox2" Display="Dynamic" ErrorMessage="RequiredFieldValidator" ForeColor="#FF0066">不可留空</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td>所处位置 &nbsp;</td>
                    <td>
                        <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBox3" Display="Dynamic" ErrorMessage="RequiredFieldValidator" ForeColor="#FF0066">不可留空</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Button ID="Button1" runat="server" Text="添加" OnClick="Button1_Click" />
                        &nbsp;<asp:Button ID="Button2" runat="server" Text="取消" />
                        
                    </td>
                </tr>
            </table>
            <br />
            <asp:Button ID="Button3" runat="server" Text="刷新" OnClick="Button3_Click" />
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="房号" DataSourceID="SqlDataSource1">
                <Columns>
                    <asp:BoundField DataField="房号" HeaderText="房号" ReadOnly="True" SortExpression="房号" />
                    <asp:BoundField DataField="房形" HeaderText="房形" SortExpression="房形" />
                    <asp:BoundField DataField="房态" HeaderText="房态" SortExpression="房态" />
                    <asp:BoundField DataField="预订状态" HeaderText="预订状态" SortExpression="预订状态" />
                    <asp:BoundField DataField="床位数" HeaderText="床位数" SortExpression="床位数" />
                    <asp:BoundField DataField="所处位置" HeaderText="所处位置" SortExpression="所处位置" />
                </Columns>
                <HeaderStyle BackColor="#97EAFF" />
            </asp:GridView>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:HotelConnectionString %>" SelectCommand="SELECT [房号], [房形], [房态], [预订状态], [床位数], [所处位置] FROM [Roominfo]"></asp:SqlDataSource>
        </div>
    </form>
</body>
</html>
